/*
 * @Description: Animal
 * @Author: rendc
 * @Date: 2025-07-31 09:47:27
 * @LastEditors: rendc
 * @LastEditTime: 2025-07-31 10:27:07
 */

public class Animal {
  // 私有成员属性 color
  private String color;
  // 非私有成员属性 age
  public int age = -1;

  // get、set
  public String getColor() {
    return color;
  }

  public int getAge() {
    return age;
  }

  public void setColor(String color) {
    this.color = color;
  }

  public void setAge(int age) {
    this.age = age;
  }

  public void show() {
    System.out.println("父类的私有color：" + getColor());
    System.out.println("父类的私有color：" + getColor());
    System.out.println("父类的非私有属性age：" + age);
  }
}